home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 30
/
Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso
/
Aminet
/
dev
/
lang
/
SmallEiffel.lha
/
SmallEiffel
/
bin_c
/
pretty12.c
< prev
next >
Wrap
C/C++ Source or Header
|
1998-12-22
|
26KB
|
1,274 lines
/*
-- ANSI C code generated by :
-- SmallEiffel The GNU Eiffel Compiler -- Release (- 0.79) --
-- Copyright (C), 1994-98 - LORIA - UHP - CRIN - INRIA - FRANCE --
-- Dominique COLNET and Suzanne COLLIN - colnet@loria.fr --
-- http://www.loria.fr/SmallEiffel --
*/
#include "pretty.h"
void r51a_r1(T51* C,T0* a1){
T0* _sp=NULL;
T0* _infix_implies=NULL;
/*[IF*/
if(r51a_keyword(C,((T0*)ms13_9513))){
{T39*n=malloc(sizeof(*n));
*n=M39;
r39make(n,(C)->_start_line/*169*/,(C)->_start_column/*165*/);
_sp=(T0*)n;
}
/*[IF*/
if(r51a_e1(C)){
{T96*n=malloc(sizeof(*n));
*n=M96;
r96make(n,a1,_sp,(C)->_last_expression/*97*/);
_infix_implies=(T0*)n;
}
r51a_r1(C,_infix_implies);
}
else{
r51error(_sp,((T0*)ms51_78732));
}
/*FI]*/
}
else{
C->_last_expression=a1;
}
/*FI]*/
}
void r51a_r2(T51* C,T0* a1){
T0* _sp=NULL;
T0* _infix_xor=NULL;
T0* _infix_or=NULL;
T0* _infix_or_else=NULL;
/*[IF*/
if(r51a_keyword(C,((T0*)ms13_456))){
{T39*n=malloc(sizeof(*n));
*n=M39;
r39make(n,(C)->_start_line/*169*/,(C)->_start_column/*165*/);
_sp=(T0*)n;
}
/*[IF*/
if(r51a_keyword(C,((T0*)ms12_1740))){
/*[IF*/
if(r51a_e2(C)){
{T104*n=malloc(sizeof(*n));
*n=M104;
r104make(n,a1,_sp,(C)->_last_expression/*97*/);
_infix_or_else=(T0*)n;
}
r51a_r2(C,_infix_or_else);
}
else{
r51err_exp(_sp,((T0*)ms13_8316));
}
/*FI]*/
}
else{
/*[IF*/
if(r51a_e2(C)){
{T103*n=malloc(sizeof(*n));
*n=M103;
r103make(n,a1,_sp,(C)->_last_expression/*97*/);
_infix_or=(T0*)n;
}
r51a_r2(C,_infix_or);
}
else{
r51err_exp(_sp,((T0*)ms13_456));
}
/*FI]*/
}
/*FI]*/
}
else if(r51a_keyword(C,((T0*)ms13_1053a))){
{T39*n=malloc(sizeof(*n));
*n=M39;
r39make(n,(C)->_start_line/*169*/,(C)->_start_column/*165*/);
_sp=(T0*)n;
}
/*[IF*/
if(r51a_e2(C)){
{T102*n=malloc(sizeof(*n));
*n=M102;
r102make(n,a1,_sp,(C)->_last_expression/*97*/);
_infix_xor=(T0*)n;
}
r51a_r2(C,_infix_xor);
}
else{
r51err_exp(_sp,((T0*)ms13_1053a));
}
/*FI]*/
}
else{
C->_last_expression=a1;
}
/*FI]*/
}
void r51a_r3(T51* C,T0* a1){
T0* _sp=NULL;
T0* _infix_and=NULL;
T0* _infix_and_then=NULL;
/*[IF*/
if(r51a_keyword(C,((T0*)ms13_939))){
{T39*n=malloc(sizeof(*n));
*n=M39;
r39make(n,(C)->_start_line/*169*/,(C)->_start_column/*165*/);
_sp=(T0*)n;
}
/*[IF*/
if(r51a_keyword(C,((T0*)ms12_1764))){
/*[IF*/
if(r51a_e3(C)){
{T106*n=malloc(sizeof(*n));
*n=M106;
r106make(n,a1,_sp,(C)->_last_expression/*97*/);
_infix_and_then=(T0*)n;
}
r51a_r3(C,_infix_and_then);
}
else{
r51err_exp(_sp,((T0*)ms13_10800));
}
/*FI]*/
}
else{
/*[IF*/
if(r51a_e3(C)){
{T105*n=malloc(sizeof(*n));
*n=M105;
r105make(n,a1,_sp,(C)->_last_expression/*97*/);
_infix_and=(T0*)n;
}
r51a_r3(C,_infix_and);
}
else{
r51err_exp(_sp,((T0*)ms13_939));
}
/*FI]*/
}
/*FI]*/
}
else{
C->_last_expression=a1;
}
/*FI]*/
}
void r51a_r4(T51* C,T0* a1){
T0* _sp=NULL;
T0* _infix_gt=NULL;
T0* _infix_ge=NULL;
T0* _infix_lt=NULL;
T0* _infix_le=NULL;
T0* _infix_neq=NULL;
T0* _infix_eq=NULL;
/*[IF*/
if(r51skip1(C,'\75')){
{T39*n=malloc(sizeof(*n));
*n=M39;
r39make(n,(C)->_start_line/*169*/,(C)->_start_column/*165*/);
_sp=(T0*)n;
}
/*[IF*/
if(r51a_e4(C)){
{T113*n=malloc(sizeof(*n));
*n=M113;
r113make(n,a1,_sp,(C)->_last_expression/*97*/);
_infix_eq=(T0*)n;
}
r51a_r4(C,_infix_eq);
}
else{
r51err_exp(_sp,((T0*)ms13_62));
}
/*FI]*/
}
else if(r51skip2(C,'\57','\75')){
{T39*n=malloc(sizeof(*n));
*n=M39;
r39make(n,(C)->_start_line/*169*/,(C)->_start_column/*165*/);
_sp=(T0*)n;
}
/*[IF*/
if(r51a_e4(C)){
{T111*n=malloc(sizeof(*n));
*n=M111;
r111make(n,a1,_sp,(C)->_last_expression/*97*/);
_infix_neq=(T0*)n;
}
r51a_r4(C,_infix_neq);
}
else{
r51err_exp(_sp,((T0*)ms13_222));
}
/*FI]*/
}
else if(r51skip2(C,'\74','\75')){
{T39*n=malloc(sizeof(*n));
*n=M39;
r39make(n,(C)->_start_line/*169*/,(C)->_start_column/*165*/);
_sp=(T0*)n;
}
/*[IF*/
if(r51a_e4(C)){
{T110*n=malloc(sizeof(*n));
*n=M110;
r110make(n,a1,_sp,(C)->_last_expression/*97*/);
_infix_le=(T0*)n;
}
r51a_r4(C,_infix_le);
}
else{
r51err_exp(_sp,((T0*)ms13_248));
}
/*FI]*/
}
else if(r51skip2(C,'\76','\75')){
{T39*n=malloc(sizeof(*n));
*n=M39;
r39make(n,(C)->_start_line/*169*/,(C)->_start_column/*165*/);
_sp=(T0*)n;
}
/*[IF*/
if(r51a_e4(C)){
{T108*n=malloc(sizeof(*n));
*n=M108;
r108make(n,a1,_sp,(C)->_last_expression/*97*/);
_infix_ge=(T0*)n;
}
r51a_r4(C,_infix_ge);
}
else{
r51err_exp(_sp,((T0*)ms13_252));
}
/*FI]*/
}
else if(r51skip1(C,'\74')){
{T39*n=malloc(sizeof(*n));
*n=M39;
r39make(n,(C)->_start_line/*169*/,(C)->_start_column/*165*/);
_sp=(T0*)n;
}
/*[IF*/
if(r51a_e4(C)){
{T109*n=malloc(sizeof(*n));
*n=M109;
r109make(n,a1,_sp,(C)->_last_expression/*97*/);
_infix_lt=(T0*)n;
}
r51a_r4(C,_infix_lt);
}
else{
r51err_exp(_sp,((T0*)ms13_61));
}
/*FI]*/
}
else if(r51skip1unless2(C,'\76','\76')){
{T39*n=malloc(sizeof(*n));
*n=M39;
r39make(n,(C)->_start_line/*169*/,(C)->_start_column/*165*/);
_sp=(T0*)n;
}
/*[IF*/
if(r51a_e4(C)){
{T107*n=malloc(sizeof(*n));
*n=M107;
r107make(n,a1,_sp,(C)->_last_expression/*97*/);
_infix_gt=(T0*)n;
}
r51a_r4(C,_infix_gt);
}
else{
r51err_exp(_sp,((T0*)ms13_63));
}
/*FI]*/
}
else{
C->_last_expression=a1;
}
/*FI]*/
}
void r51a_r5(T51* C,T0* a1){
T0* _sp=NULL;
T0* _infix_minus=NULL;
T0* _infix_plus=NULL;
/*[IF*/
if(r51skip1(C,'\53')){
{T39*n=malloc(sizeof(*n));
*n=M39;
r39make(n,(C)->_start_line/*169*/,(C)->_start_column/*165*/);
_sp=(T0*)n;
}
/*[IF*/
if(r51a_e5(C)){
{T115*n=malloc(sizeof(*n));
*n=M115;
r115make(n,a1,_sp,(C)->_last_expression/*97*/);
_infix_plus=(T0*)n;
}
r51a_r5(C,_infix_plus);
}
else{
r51err_exp(_sp,((T0*)ms13_44));
}
/*FI]*/
}
else if(r51skip1(C,'\55')){
{T39*n=malloc(sizeof(*n));
*n=M39;
r39make(n,(C)->_start_line/*169*/,(C)->_start_column/*165*/);
_sp=(T0*)n;
}
/*[IF*/
if(r51a_e5(C)){
{T114*n=malloc(sizeof(*n));
*n=M114;
r114make(n,a1,_sp,(C)->_last_expression/*97*/);
_infix_minus=(T0*)n;
}
r51a_r5(C,_infix_minus);
}
else{
r51err_exp(_sp,((T0*)ms13_46));
}
/*FI]*/
}
else{
C->_last_expression=a1;
}
/*FI]*/
}
void r51a_r6(T51* C,T0* a1){
T0* _sp=NULL;
T0* _infix_div=NULL;
T0* _infix_int_rem=NULL;
T0* _infix_int_div=NULL;
T0* _infix_times=NULL;
/*[IF*/
if(r51skip1(C,'\52')){
{T39*n=malloc(sizeof(*n));
*n=M39;
r39make(n,(C)->_start_line/*169*/,(C)->_start_column/*165*/);
_sp=(T0*)n;
}
/*[IF*/
if(r51a_e6(C)){
{T119*n=malloc(sizeof(*n));
*n=M119;
r119make(n,a1,_sp,(C)->_last_expression/*97*/);
_infix_times=(T0*)n;
}
r51a_r6(C,_infix_times);
}
else{
r51err_exp(_sp,((T0*)ms13_43));
}
/*FI]*/
}
else if(r51skip2(C,'\57','\57')){
{T39*n=malloc(sizeof(*n));
*n=M39;
r39make(n,(C)->_start_line/*169*/,(C)->_start_column/*165*/);
_sp=(T0*)n;
}
/*[IF*/
if(r51a_e6(C)){
{T118*n=malloc(sizeof(*n));
*n=M118;
r118make(n,a1,_sp,(C)->_last_expression/*97*/);
_infix_int_div=(T0*)n;
}
r51a_r6(C,_infix_int_div);
}
else{
r51err_exp(_sp,((T0*)ms51_194a));
}
/*FI]*/
}
else if(r51skip2(C,'\134','\134')){
{T39*n=malloc(sizeof(*n));
*n=M39;
r39make(n,(C)->_start_line/*169*/,(C)->_start_column/*165*/);
_sp=(T0*)n;
}
/*[IF*/
if(r51a_e6(C)){
{T117*n=malloc(sizeof(*n));
*n=M117;
r117make(n,a1,_sp,(C)->_last_expression/*97*/);
_infix_int_rem=(T0*)n;
}
r51a_r6(C,_infix_int_rem);
}
else{
r51err_exp(_sp,((T0*)ms51_374a));
}
/*FI]*/
}
else if(r51skip1unless2(C,'\57','\75')){
{T39*n=malloc(sizeof(*n));
*n=M39;
r39make(n,(C)->_start_line/*169*/,(C)->_start_column/*165*/);
_sp=(T0*)n;
}
/*[IF*/
if(r51a_e6(C)){
{T116*n=malloc(sizeof(*n));
*n=M116;
r116make(n,a1,_sp,(C)->_last_expression/*97*/);
_infix_div=(T0*)n;
}
r51a_r6(C,_infix_div);
}
else{
r51err_exp(_sp,((T0*)ms13_48));
}
/*FI]*/
}
else{
C->_last_expression=a1;
}
/*FI]*/
}
void r51a_r7(T51* C,T0* a1){
T0* _sp=NULL;
/*[IF*/
if(r51skip1(C,'\136')){
{T39*n=malloc(sizeof(*n));
*n=M39;
r39make(n,(C)->_start_line/*169*/,(C)->_start_column/*165*/);
_sp=(T0*)n;
}
/*[IF*/
if(r51a_e7(C)){
r51a_r7(C,(C)->_last_expression/*97*/);
{T178*n=malloc(sizeof(*n));
*n=M178;
r178make(n,a1,_sp,(C)->_last_expression/*97*/);
C->_last_expression=(T0*)n;
}
}
else{
r51err_exp(_sp,((T0*)ms51_95a));
}
/*FI]*/
}
else{
C->_last_expression=a1;
}
/*FI]*/
}
void r51a_r8(T51* C,T0* a1){
T0* _infix_freeop=NULL;
T0* _infix_name=NULL;
/*[IF*/
if(r51a_free_operator(C)){
_infix_name=r92to_infix_name_use((T92*)(oBC51tmp_name));
/*[IF*/
if(r51a_e8(C)){
{T120*n=malloc(sizeof(*n));
*n=M120;
r120make(n,a1,_infix_name,(C)->_last_expression/*97*/);
_infix_freeop=(T0*)n;
}
r51a_r8(C,_infix_freeop);
}
else{
r51err_exp((((T121*)_infix_name))->_start_position/*8*/,(((T121*)_infix_name))->_to_string/*4*/);
}
/*FI]*/
}
else{
C->_last_expression=a1;
}
/*FI]*/
}
/*No:EIFFEL_PARSER.fz_undefine*/
/*No:EIFFEL_PARSER.us_any*/
T6 r51a_constant(T51* C){
T6 R=0;
T0* _sfn=NULL;
T0* _implicit_current=NULL;
/*[IF*/
if(r51a_identifier(C)){
R=1;
_sfn=r92to_simple_feature_name((T92*)(oBC51tmp_name));
{T177*n=malloc(sizeof(*n));
*n=M177;
/*[IRF3.3make*/((((T177*)(n)))->_start_position)=((((T131*)_sfn))->_start_position/*8*/);
/*]*/
_implicit_current=(T0*)n;
}
{T133*n=malloc(sizeof(*n));
*n=M133;
r133make(n,_implicit_current,_sfn);
C->_last_expression=(T0*)n;
}
}
else if(r51a_character_constant(C)){
R=1;
C->_last_expression=(C)->_last_character_constant/*85*/;
}
else if(r51a_integer_constant(C)){
R=1;
C->_last_expression=(C)->_last_integer_constant/*129*/;
}
/*FI]*/
return R;
}
/*No:EIFFEL_PARSER.us_real*/
/*No:EIFFEL_PARSER.fz_from*/
/*No:EIFFEL_PARSER.fz_false*/
/*No:EIFFEL_PARSER.show_nb_warnings*/
/*No:EIFFEL_PARSER.local_vars*/
/*No:ASSIGNMENT.nb_errors*/
/*No:ASSIGNMENT.fz_brhsoa*/
T0* r267start_position(T267* C){
T0* R=NULL;
R=X89start_position((C)->_left_side/*4*/);
return R;
}
T0* r267add_comment(T267* C,T0* a1){
T0* R=NULL;
/*[IF*/
if(((a1)==((void*)(NULL)))||((/*(IRF4.6count*/r32count(((T32*)((((T64*)a1))->_list/*4*/)))/*)*/)==(0))){
R=(T0*)C;
}
/*AF*/else{
{T209*n=malloc(sizeof(*n));
*n=M209;
r209make(n,(T0*)C,a1);
R=(T0*)n;
}
}
/*FI]*/
return R;
}
T0* r267right_type(T267* C){
T0* R=NULL;
R=X89result_type((C)->_right_side/*8*/);
return R;
}
/*No:ASSIGNMENT.right_side*/
void r267implicit_conversion(T267* C){
T0* _right_run_type=NULL;
T0* _left_run_type=NULL;
/*[IF*/
if((/*(IRF4.9nb_errors*/((T37*)(oBC11eh))->_nb_errors/*4*//*)*/)==(0)){
_left_run_type=X62run_type(r267left_type(C));
_right_run_type=X62run_type(r267right_type(C));
/*[IF*/
if(X62is_reference(_left_run_type)){
/*[IF*/
if(X62is_reference(_right_run_type)){
}
else{
X62used_as_reference(_right_run_type);
}
/*FI]*/
}
else{
/*[IF*/
if(X62is_reference(_right_run_type)){
/*[IF*/
if(X89is_void((C)->_right_side/*8*/)){
r37add_position(X89start_position((C)->_right_side/*8*/));
/*[IRF3.6append*/{T0* b1=((T0*)ms267_169026);
r7append((T7*)(oBC37explanation),b1);
}/*]*/
r37add_type(r267left_type(C),((T0*)ms267_47));
r37print_as_error((T37*)(oBC11eh));
}
else{
r267warning(X89start_position((C)->_left_side/*4*/),((T0*)ms267_56296));
}
/*FI]*/
}
/*FI]*/
}
/*FI]*/
}
/*FI]*/
}
T0* r267to_runnable(T267* C,T0* a1){
T0* R=NULL;
T0* _r=NULL;
T0* _l=NULL;
_l=X89to_runnable((C)->_left_side/*4*/,a1);
/*[IF*/
if((_l)==((void*)(NULL))){
r37add_position(X89start_position((C)->_left_side/*4*/));
/*[IRF3.6fatal_error*/{T0* b1=((T0*)ms12_63888);
r37fatal_error((T37*)(oBC11eh),b1);
}/*]*/
}
/*FI]*/
_r=X89to_runnable((C)->_right_side/*8*/,a1);
/*[IF*/
if((_r)==((void*)(NULL))){
r37add_position(X89start_position((C)->_right_side/*8*/));
/*[IRF3.6fatal_error*/{T0* b1=((T0*)ms12_67592);
r37fatal_error((T37*)(oBC11eh),b1);
}/*]*/
}
/*FI]*/
/*[IF*/
if(!(X62is_a(X89result_type(_r),X89result_type(_l)))){
r37add_position(X89start_position(_l));
/*[IRF3.6fatal_error*/{T0* b1=((T0*)ms267_17248);
r37fatal_error((T37*)(oBC11eh),b1);
}/*]*/
}
/*FI]*/
/*[IF*/
if(((_l)==((void*)((C)->_left_side/*4*/)))&&((_r)==((void*)((C)->_right_side/*8*/)))){
R=(T0*)C;
r267implicit_conversion(C);
}
else{
{T267*n=malloc(sizeof(*n));
*n=M267;
r267make(n,_l,_r);
R=(T0*)n;
}
r267implicit_conversion(((T267*)R));
}
/*FI]*/
return R;
}
void r267warning(T0* a1,T0* a2){
r37add_position(a1);
r37warning((T37*)(oBC11eh),a2);
}
/*No:ASSIGNMENT.fz_blhsoa*/
T0* r267left_type(T267* C){
T0* R=NULL;
R=X89result_type((C)->_left_side/*4*/);
return R;
}
/*No:ASSIGNMENT.left_side*/
/*No:ASSIGNMENT.end_mark_comment*/
void r267make(T267* C,T0* a1,T0* a2){
C->_left_side=a1;
C->_right_side=a2;
}
void r267pretty_print_assignment(T0* a1,T0* a2,T0* a3){
T6 _semi_colon_flag=0;
X89pretty_print(a1);
r310put_character((T310*)(oBC11fmt),'\40');
r310put_string((T310*)(oBC11fmt),a2);
r310put_character((T310*)(oBC11fmt),'\40');
_semi_colon_flag=((T310*)(oBC11fmt))->_semi_colon_flag/*25*/;
r310level_incr((T310*)(oBC11fmt));
/*[IRF3.3set_semi_colon_flag*/((((T310*)((T310*)(oBC11fmt))))->_semi_colon_flag)=(0);
/*]*/
X89pretty_print(a3);
/*[IRF3.3set_semi_colon_flag*/((((T310*)((T310*)(oBC11fmt))))->_semi_colon_flag)=(_semi_colon_flag);
/*]*/
/*[IF*/
if(_semi_colon_flag){
r310put_character((T310*)(oBC11fmt),'\73');
}
/*FI]*/
r310level_decr((T310*)(oBC11fmt));
}
/*No:ASSIGNMENT.pretty_print*/
/*No:ASSIGNMENT.fatal_error*/
/*No:RUN_CONTROL.generating_type_used*/
T6 r54ensure_check(T54* C){
T6 R=0;
R=((C)->_level/*0*/)>=(-3);
return R;
}
T6 r54debug_check(T54* C){
T6 R=0;
R=((C)->_level/*0*/)==(1);
return R;
}
/*No:RUN_CONTROL.level_loop*/
/*No:RUN_CONTROL.level_check_all*/
T6 r54all_check(T54* C){
T6 R=0;
R=((C)->_level/*0*/)>=(0);
return R;
}
/*No:RUN_CONTROL.set_generating_type_used*/
/*No:RUN_CONTROL.level_boost*/
/*No:RUN_CONTROL.level_ensure*/
/*No:RUN_CONTROL.level_require*/
T6 r54boost(T54* C){
T6 R=0;
R=((C)->_level/*0*/)==(-6);
return R;
}
/*No:RUN_CONTROL.generator_used*/
/*No:RUN_CONTROL.level_check_debug*/
/*No:RUN_CONTROL.make*/
/*No:RUN_CONTROL.set_generator_used*/
/*No:RUN_CONTROL.level*/
T6 r54require_check(T54* C){
T6 R=0;
R=((C)->_level/*0*/)>=(-4);
return R;
}
T6 r54loop_check(T54* C){
T6 R=0;
R=((C)->_level/*0*/)>=(-1);
return R;
}
/*No:INDEX_LIST.add_last*/
/*No:INDEX_LIST.fz_00*/
/*No:INDEX_LIST.make*/
void r306pretty_print(T306* C){
T2 _i=0;
r310put_string((T310*)(oBC11fmt),((T0*)ms306_11000));
r310level_incr((T310*)(oBC11fmt));
r310indent((T310*)(oBC11fmt));
_i=1;
while (!((_i)>(((T307*)((C)->_list/*0*/))->_upper/*8*/))) {
r305pretty_print((T305*)(r307item((T307*)((C)->_list/*0*/),_i)));
_i=(_i)+(1);
/*[IF*/
if((_i)<=(((T307*)((C)->_list/*0*/))->_upper/*8*/)){
r310put_string((T310*)(oBC11fmt),((T0*)ms12_144));
}
/*FI]*/
}
r310put_character((T310*)(oBC11fmt),'\73');
r310level_decr((T310*)(oBC11fmt));
r310indent((T310*)(oBC11fmt));
}
/*No:INDEX_LIST.list*/
/*No:EXPORT_ITEM.for_all*/
void r301make(T301* C,T0* a1,T0* a2){
C->_clients=a1;
C->_list=a2;
}
void r301make_all(T301* C,T0* a1){
C->_clients=a1;
C->_list=NULL;
}
T6 r301affect(T301* C,T0* a1){
T6 R=0;
/*[IF*/
if(/*(IRF4.7for_all*/((C)->_list/*4*/)==(NULL)/*)*/){
R=1;
}
else{
R=r67has((T67*)((C)->_list/*4*/),a1);
}
/*FI]*/
return R;
}
void r301pretty_print(T301* C){
r83pretty_print((T83*)((C)->_clients/*0*/));
/*[IF*/
if(/*(IRF4.7for_all*/((C)->_list/*4*/)==(NULL)/*)*/){
r310keyword((T310*)(oBC11fmt),((T0*)ms301_957));
}
else{
r67pretty_print((T67*)((C)->_list/*4*/));
}
/*FI]*/
}
/*No:EXPORT_ITEM.list*/
/*No:EXPORT_ITEM.clients*/
T6 r42is_used(T0* a1){
T6 R=0;
R=r44has((T44*)(oBC42base_class_dictionary),a1);
return R;
}
T0* r42base_class(T42* C,T0* a1){
T0* R=NULL;
/*[IF*/
if(r44has((T44*)(oBC42base_class_dictionary),(((T49*)a1))->_to_string/*0*/)){
R=r44at((T44*)(oBC42base_class_dictionary),(((T49*)a1))->_to_string/*0*/);
}
else if(((T51*)(oBC11eiffel_parser))->_is_running/*8*/){
/*[IRF3.6fatal_error*/{T0* b1=((T0*)ms42_71162);
r37fatal_error((T37*)(oBC11eh),b1);
}/*]*/
}
else{
/*[IF*/
if(r42parser_buffer_for(C,(((T49*)a1))->_to_string/*0*/)){
R=r51analyse_class((T51*)(oBC11eiffel_parser),a1);
}
/*FI]*/
/*[IF*/
if((R)==((void*)(NULL))){
r37add_position((((T49*)a1))->_start_position/*4*/);
/*[IRF3.6fatal_error*/{T0* b1=((T0*)ms42_31059);
r37fatal_error((T37*)(oBC11eh),b1);
}/*]*/
}
/*FI]*/
}
/*FI]*/
return R;
}
T6 r42re_load_class(T42* C,T0* a1){
T6 R=0;
T0* _new_class=NULL;
T0* _name=NULL;
_name=((T49*)((((T41*)a1))->_name/*24*/))->_to_string/*0*/;
r44remove((T44*)(oBC42base_class_dictionary),_name);
_new_class=r42load_class(C,_name);
R=(_new_class)!=((void*)(NULL));
return R;
}
/*No:SMALL_EIFFEL.base_class_count*/
T0*oBC11tmp_file_read=NULL;
void r42add_class(T42* C,T0* a1){
r44put((T44*)(oBC42base_class_dictionary),a1,((T49*)((((T41*)a1))->_name/*24*/))->_to_string/*0*/);
r42incr_magic_count(C);
}
/*No:SMALL_EIFFEL.eiffel_suffix*/
/*No:SMALL_EIFFEL.fz_03*/
T0* r42load_class(T42* C,T0* a1){
T0* R=NULL;
/*[IF*/
if(r42parser_buffer_for(C,a1)){
R=r51analyse_class((T51*)(oBC11eiffel_parser),NULL);
/*[IF*/
if((R)==((void*)(NULL))){
/*[IRF3.6fatal_error*/{T0* b1=((T0*)ms42_24084);
r37fatal_error((T37*)(oBC11eh),b1);
}/*]*/
}
/*FI]*/
}
else{
/*[IRF3.6fatal_error*/{T0* b1=((T0*)ms42_24084a);
r37fatal_error((T37*)(oBC11eh),b1);
}/*]*/
}
/*FI]*/
return R;
}
T0* r42run_class(T0* a1){
T0* R=NULL;
T0* _run_string=NULL;
_run_string=X62run_time_mark(a1);
/*[IF*/
if(r318has((T318*)(oBC42run_class_dictionary),_run_string)){
R=r318at((T318*)(oBC42run_class_dictionary),_run_string);
}
else{
{T313*n=malloc(sizeof(*n));
*n=M313;
r313make(n,a1);
R=(T0*)n;
}
}
/*FI]*/
return R;
}
T0* r42get_class(T0* a1){
T0* R=NULL;
/*[IF*/
if(r44has((T44*)(oBC42base_class_dictionary),a1)){
R=r44at((T44*)(oBC42base_class_dictionary),a1);
}
else{
r49make((T49*)(r42tmp_class_name()),a1,NULL);
R=r49base_class((T49*)(r42tmp_class_name()));
}
/*FI]*/
return R;
}
void r42pop(T42* C){
C->_top=((C)->_top/*8*/)-(1);
}
/*No:SMALL_EIFFEL.magic_count*/
T0*oBC42run_class_dictionary=NULL;
/*No:SMALL_EIFFEL.top*/
T0*oBC42parser_buffer_path=NULL;
T0*oBC42tmp_tail=NULL;
int fBC42rename_dictionary=0;
T0*oBC42rename_dictionary=NULL;
T0* r42rename_dictionary(T42* C){
if(fBC42rename_dictionary==0){
T0* _short_name=NULL;
T0* _full_name=NULL;
T2 _i=0;
fBC42rename_dictionary=1;
{T53*n=malloc(sizeof(*n));
*n=M53;
/*[IRF3.4make*/r53with_capacity(n,32);
/*]*/
oBC42rename_dictionary=(T0*)n;
}
_i=1;
while (!((_i)>(((T32*)(r42loading_path()))->_upper/*8*/))) {
r7copy((T7*)(((T0*)ms11_583550)),r32item((T32*)(r42loading_path()),_i));
r7append((T7*)(((T0*)ms11_583550)),((T0*)ms42_13095));
r33sfr_connect((T33*)(oBC11echo),oBC11tmp_file_read,((T0*)ms11_583550));
/*[IF*/
if(/*(IRF4.7is_connected*/(((T29*)(oBC11tmp_file_read))->_path/*4*/)!=(NULL)/*)*/){
while (!(r29end_of_input((T29*)(oBC11tmp_file_read)))) {
r29read_word((T29*)(oBC11tmp_file_read));
_full_name=r7twin((T7*)(oBC30last_string));
r29read_word((T29*)(oBC11tmp_file_read));
_short_name=r7twin((T7*)(oBC30last_string));
r7prepend(((T7*)_short_name),r32item((T32*)(r42loading_path()),_i));
/*[IF*/
if(r53has(((T53*)oBC42rename_dictionary),_full_name)){
r33w_put_string(((T0*)ms42_24360));
r33w_put_string(_full_name);
r33w_put_string(((T0*)ms42_55872));
r33w_put_string(_short_name);
r33w_put_string(((T0*)ms42_5280));
r33w_put_string(r53at(((T53*)oBC42rename_dictionary),_full_name));
r33w_put_string(((T0*)ms42_118));
exit(1);
}
/*FI]*/
r53put(((T53*)oBC42rename_dictionary),_short_name,_full_name);
r29skip_separators((T29*)(oBC11tmp_file_read));
}
r29disconnect((T29*)(oBC11tmp_file_read));
}
/*FI]*/
_i=(_i)+(1);
}
}
return oBC42rename_dictionary;}
/*No:SMALL_EIFFEL.fatal_error*/
void r42incr_magic_count(T42* C){
C->_magic_count=((C)->_magic_count/*4*/)+(1);
}
int fBC42loading_path=0;
T0*oBC42loading_path=NULL;
T0* r42loading_path(void){
if(fBC42loading_path==0){
fBC42loading_path=1;
{T32*n=malloc(sizeof(*n));
*n=M32;
r32with_capacity(n,16,1);
oBC42loading_path=(T0*)n;
}
r28read_loading_path_in((T28*)(r42system_tools()),oBC42loading_path);
}
return oBC42loading_path;}
void r42push(T42* C,T0* a1){
C->_top=((C)->_top/*8*/)+(1);
r323force((T323*)(oBC42stack_rf),a1,(C)->_top/*8*/);
}
/*No:SMALL_EIFFEL.short_flag*/
T6 r42parser_buffer_for(T42* C,T0* a1){
T6 R=0;
T2 _i=0;
r7copy((T7*)(oBC42tmp_tail),a1);
r7to_lower((T7*)(oBC42tmp_tail));
/*[IF*/
if(!(r7has_suffix((T7*)(oBC42tmp_tail),((T0*)ms11_300)))){
r7append((T7*)(oBC42tmp_tail),((T0*)ms11_300));
}
/*FI]*/
_i=((T32*)(r42loading_path()))->_lower/*12*/;
while (!(((_i)>(((T32*)(r42loading_path()))->_upper/*8*/))||(R))) {
r7copy((T7*)(oBC42parser_buffer_path),r32item((T32*)(r42loading_path()),_i));
r7append((T7*)(oBC42parser_buffer_path),oBC42tmp_tail);
r52load_file((T52*)(oBC11parser_buffer),oBC42parser_buffer_path);
R=/*(IRF4.7is_ready*/(((T52*)(oBC11parser_buffer))->_path/*0*/)!=(NULL)/*)*/;
_i=(_i)+(1);
}
/*[IF*/
if((!(R))&&(r53has((T53*)(r42rename_dictionary(C)),oBC42tmp_tail))){
r7copy((T7*)(oBC42parser_buffer_path),r53at((T53*)(r42rename_dictionary(C)),oBC42tmp_tail));
r52load_file((T52*)(oBC11parser_buffer),oBC42parser_buffer_path);
/*[IF*/
if(/*(IRF4.7is_ready*/(((T52*)(oBC11parser_buffer))->_path/*0*/)!=(NULL)/*)*/){
R=1;
}
else{
r33w_put_string(((T0*)ms42_53690));
r33w_put_string(oBC42parser_buffer_path);
r33w_put_string(((T0*)ms12_166));
exit(1);
}
/*FI]*/
}
/*FI]*/
/*[IF*/
if(!(R)){
r7copy((T7*)(oBC42tmp_tail),a1);
/*[IF*/
if(!(r7has_suffix((T7*)(oBC42tmp_tail),((T0*)ms11_300)))){
r7append((T7*)(oBC42tmp_tail),((T0*)ms11_300));
}
/*FI]*/
_i=((T32*)(r42loading_path()))->_lower/*12*/;
while (!(((_i)>(((T32*)(r42loading_path()))->_upper/*8*/))||(R))) {
r7copy((T7*)(oBC42parser_buffer_path),r32item((T32*)(r42loading_path()),_i));
r7append((T7*)(oBC42parser_buffer_path),oBC42tmp_tail);
r52load_file((T52*)(oBC11parser_buffer),oBC42parser_buffer_path);
R=/*(IRF4.7is_ready*/(((T52*)(oBC11parser_buffer))->_path/*0*/)!=(NULL)/*)*/;
_i=(_i)+(1);
}
}
/*FI]*/
/*[IF*/
if(!(R)){
r33w_put_string(((T0*)ms42_48577));
r33w_put_string(a1);
r33w_put_string(((T0*)ms42_354));
/*[IRF3.3clear*/((((T7*)((T7*)(oBC42parser_buffer_path))))->_count)=(0);
/*]*/
/*[IRF3.6append_loading_path_in*/{T0* b1=oBC42parser_buffer_path;
r28append_lp_in((T28*)(r42system_tools()),b1,r42loading_path());
}/*]*/
r33w_put_string(oBC42parser_buffer_path);
}
/*FI]*/
return R;
}
int fBC11system_tools=0;
T0*oBC11system_tools=NULL;
T0* r42system_tools(void){
if(fBC11system_tools==0){
fBC11system_tools=1;
{T28*n=malloc(sizeof(*n));
*n=M28;
r28make(n);
oBC11system_tools=(T0*)n;
}
}
return oBC11system_tools;}
T0* r42top_rf(T42* C){
T0* R=NULL;
R=r323item((T323*)(oBC42stack_rf),(C)->_top/*8*/);
return R;
}
/*No:SMALL_EIFFEL.make*/
/*No:SMALL_EIFFEL.us_any*/
T0*oBC42stack_rf=NULL;
/*No:SMALL_EIFFEL.exit_failure_code*/
T0*oBC42base_class_dictionary=NULL;
int fBC42tmp_class_name=0;
T0*oBC42tmp_class_name=NULL;
T0* r42tmp_class_name(void){
if(fBC42tmp_class_name==0){
fBC42tmp_class_name=1;
{T49*n=malloc(sizeof(*n));
*n=M49;
r49make(n,((T0*)ms13_714),NULL);
oBC42tmp_class_name=(T0*)n;
}
}
return oBC42tmp_class_name;}
/*No:SMALL_EIFFEL.tmp_path*/
/*No:SMALL_EIFFEL.append_loading_path_in*/
void r295append_in(T295* C,T0* a1){
T2 _i=0;
_i=/*X296lower*/((T2)((T169*)((C)->_name_list/*4*/))->_lower/*16*/);
while (!((_i)>(/*X296upper*/((T2)((T169*)((C)->_name_list/*4*/))->_upper/*12*/)))) {
X163add_last(a1,/*X296item*/((T0*)r169item((T169*)((C)->_name_list/*4*/),_i)));
_i=(_i)+(1);
}
}
/*No:DECLARATION_GROUP.name_list*/
T2 r295count(T295* C){
T2 R=0;
R=/*X296upper*/((T2)((T169*)((C)->_name_list/*4*/))->_upper/*12*/);
return R;
}
void r295make(T295* C,T0* a1,T0* a2){
T2 _i=0;
C->_name_list=a1;
_i=/*X296upper*/((T2)((T169*)((C)->_name_list/*4*/))->_upper/*12*/);
while (!((_i)==(0))) {
/*X168set_result_type*//*[IRF3.3set_result_type*/((((T167*)((T167*)(/*X296item*/((T0*)r169item((T169*)((C)->_name_list/*4*/),_i))))))->_result_type)=(a2);
/*]*/
_i=(_i)-(1);
}
}
void r295pretty_print(T295* C){
T2 _i=0;
_i=/*X296lower*/((T2)((T169*)((C)->_name_list/*4*/))->_lower/*16*/);
X168pretty_print(/*X296item*/((T0*)r169item((T169*)((C)->_name_list/*4*/),_i)));
_i=(_i)+(1);
while (!((_i)>(/*X296upper*/((T2)((T169*)((C)->_name_list/*4*/))->_upper/*12*/)))) {
r310put_string((T310*)(oBC11fmt),((T0*)ms295_158));
X168pretty_print(/*X296item*/((T0*)r169item((T169*)((C)->_name_list/*4*/),_i)));
_i=(_i)+(1);
}
r310put_string((T310*)(oBC11fmt),((T0*)ms295_186));
X62pretty_print(/*X168result_type*/((T0*)((T167*)(/*X296item*/((T0*)r169item((T169*)((C)->_name_list/*4*/),1))))->_result_type/*12*/));
}
/*No:E_REQUIRE.set_require_else*/
/*No:E_REQUIRE.start_position*/
/*No:E_REQUIRE.header_comment*/
/*No:E_REQUIRE.current_type*/
/*No:E_REQUIRE.run_feature*/
void r271make(T271* C,T0* a1,T0* a2,T0* a3){
C->_start_position=a1;
C->_header_comment=a2;
C->_list=a3;
}
void r271pretty_print(T271* C){
T2 _i=0;
r310indent((T310*)(oBC11fmt));
r310keyword((T310*)(oBC11fmt),r271name(C));
r310level_incr((T310*)(oBC11fmt));
/*[IF*/
if(((C)->_header_comment/*4*/)!=((void*)(NULL))){
r64pretty_print((T64*)((C)->_header_comment/*4*/));
}
else{
r310indent((T310*)(oBC11fmt));
}
/*FI]*/
/*[IF*/
if(((C)->_list/*8*/)!=((void*)(NULL))){
_i=1;
while (!((_i)>(((T88*)((C)->_list/*8*/))->_upper/*8*/))) {
/*[IF*/
if(r6_px_and(r310zen_mode((T310*)(oBC11fmt)),(_i)==(((T88*)((C)->_list/*8*/))->_upper/*8*/))){
/*[IRF3.3set_semi_colon_flag*/((((T310*)((T310*)(oBC11fmt))))->_semi_colon_flag)=(0);
/*]*/
}
else{
/*[IRF3.3set_semi_colon_flag*/((((T310*)((T310*)(oBC11fmt))))->_semi_colon_flag)=(1);
/*]*/
}
/*FI]*/
r310indent((T310*)(oBC11fmt));
r85pretty_print((T85*)(r88item((T88*)((C)->_list/*8*/),_i)));
_i=(_i)+(1);
}
}
/*FI]*/
r310level_decr((T310*)(oBC11fmt));
r310indent((T310*)(oBC11fmt));
}
void r271make_runnable(T271* C,T0* a1,T0* a2,T0* a3){
C->_list=a1;
C->_current_type=a2;
C->_run_feature=a3;
}
T0* r271name(T271* C){
T0* R=NULL;
/*[IF*/
if((C)->_is_require_else/*20*/){
R=((T0*)ms271_21324);
}
else{
R=((T0*)ms271_8904);
}
/*FI]*/
return R;
}
/*No:E_REQUIRE.set_header_comment*/
/*No:E_REQUIRE.is_require_else*/
/*No:E_REQUIRE.empty*/
/*No:E_REQUIRE.list*/